<?php

	class Question_model extends Model {

		protected $__tbname = 'question';
		protected $__dbconf = '';

		var $id;	//int(11)	Primary Key	Auto Increment	NOT NULL
		var $question_type_id;	//int(11)			NOT NULL
		var $title;	//varchar(255)			NOT NULL
		var $content;	//text			NULL
		var $image;	//varchar(255)			NULL
		var $disabled = 0;	//int(1)			NOT NULL

		protected $__validation_rule = array(
			'id' => array('key' => 'PRI', 'type' => 'int', 'null' => FALSE, 'auto_increment' => TRUE),
			'question_type_id' => array('key' => 'MUL', 'type' => 'int', 'null' => FALSE),
			'title' => array('type' => 'varchar', 'size' => 255, 'null' => FALSE),
			'content' => array('type' => 'text', 'null' => TRUE),
			'image' => array('type' => 'varchar', 'size' => 255, 'null' => TRUE),
			'disabled' => array('type' => 'int', 'null' => FALSE)
		);
	}
